import { Avatar, List } from 'antd'
import { Comment } from '../api/comment'
interface CommentListProps {
    data: Comment[]
}
const CommentList: React.FC<CommentListProps> = ({ data }) => {
    return (
        <>
            <List
                dataSource={data}
                renderItem={(item) => (
                    <List.Item>
                        <List.Item.Meta
                            avatar={
                                <Avatar src={`https://xsgames.co/randomusers/avatar.php?g=pixel&key=${item.userId}`} />
                            }
                            title={item.nickname}
                            description={item.content}
                        />
                    </List.Item>
                )}
            >

            </List>
        </>
    )
}

export default CommentList